package com.goodmean.student;

import com.goodmean.common.User;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

public class StudentInterceptor implements Interceptor {
    @Override
    public void intercept(Invocation invocation) {



        User user = invocation.getController().getSessionAttr("user");
        if ("3".equals(user.getStatus())) {
            invocation.invoke();
        } else {
            invocation.getController().redirect("/student");
        }
    }

}
